﻿using System.Threading.Tasks;

namespace Loong.BackgroundJobs
{
    public interface IBackgroundJobStore
    {
        Task<BackgroundJobInfo> GetAndLockWaitingJobAsync();

        Task InsertJobAsync(BackgroundJobInfo jobInfo);

        Task UpdateJobAsync(BackgroundJobInfo jobInfo);

        Task DeleteJobAsync(long jobId);

        Task DeleteJobAsync(BackgroundJobInfo jobInfo);
    }
}
